﻿using System;
using System.Text.RegularExpressions;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
          {
            Console.WriteLine("请输入电话号码");
            string str = Console.ReadLine();

            if (Regex.IsMatch(str, @"^(13[0-9]\d{8})|(14[57]\d{8})|(15[0-3]\d{8})|(15[5-9]\d{8})|(17[6-8]\d{8})|(18\d{9})$"))
            {
                Console.WriteLine("正确");
            }
            else
            {
                Console.WriteLine("错误");
            }
           }
           
            


        }
        static void Test()
        {
            while (true)
            {
                Console.WriteLine("请输入邮箱号码");
                string s = Console.ReadLine();

                if (Regex.IsMatch(s, @"^(\w)+@(\w+)\.(com|org|net|edu|mil|tv|biz|info)$"))
                {
                    Console.WriteLine("正确");
                }
                else
                {
                    Console.WriteLine("错误");
                }

            }
        }

    }
}
